#include <stdio.h>
#include "shape.h"
#include "triangle.h"
#include "rectangle.h"
#include "circle.h"

struct Express
{
    char shape;

    CShape * draw;
};

#define COUNT  6

Express exp[COUNT] = {
    { .shape = 't',  .draw = new CTriangle('t') },
    { .shape = 'r',  .draw = new CRectangle('r') },
    { .shape = 'c',  .draw = new CCircle('c') },
    { .shape = 't',  .draw = new CTriangle('t') },
    { .shape = 'r',  .draw = new CRectangle('r') },
    { .shape = 'c',  .draw = new CCircle('c') },
  

};


int main()
{
    for (int i = 0; i < COUNT; i++)
    {
       char shape=exp[i].shape;
       
       exp[i].draw->set(shape);
       exp[i].draw->exec();
       exp[i].draw->output();
       delete exp[i].draw;
    }

    return 0;
}
